package cn.yuyiling.jelly.sr.controller;

import cn.yuyiling.jelly.sr.api.KnowledgeProgressService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/knowledge-progress")
public class KnowledgeProgressController {

    private static final Logger logger = LoggerFactory.getLogger(KnowledgeProgressController.class);

    @DubboReference(scope = "remote")
    private KnowledgeProgressService knowledgeProgressService;

    @GetMapping("/heatmap/{userId}")
    public Map<String, String> getKnowledgeHeatmap(@PathVariable String userId) {
        return knowledgeProgressService.getKnowledgeHeatmapColors(userId);
    }
}